<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>02变量与常量</title>
</head>
<body>

<script>
    //JS是一门弱类型语言,不需要指定变量的数据类型
    //1.使用var关键字声明变量
    var a = 10;
    var b = '你好!';
    var c = true;

    console.log(a,b,c);
    console.log(typeof a,typeof b,typeof c);
    a = false;
    console.log(a);
    var a ='哈哈哈我又来了';
    console.log(a);

    let x = 1;
    console.log(x);
    x = 6.6;
    console.log(x);
    // let x = true
    // console.log(x);//let声明的变量不可重复声明,会报错

    const y = 1;
    console.log(y);
    // y = 555;//常量的值不允许被修改
</script>
</body>
</html>